package com.hup.minicontroller.common.netty.handler.dataListener;

import android.util.Log;

import com.hup.minicontroller.common.netty.model.BaseDataPacket;

/**
 * 简单打印[收发数据]的处理器;
 * 一般用于测试,本类仅供参考,一般情况下需要自定义实现类,以处理打印不同类别的数据
 *
 * @author hugan
 * @date 2021/5/9
 */
public class PrintDataListener implements IDataListener {
    private static final String TAG = PrintDataListener.class.getSimpleName();

    @Override
    public void onReceived(BaseDataPacket packet, int dataLength) {
        //packet.getType() 过滤数据
        Log.i(TAG, "收到:" + packet);
    }

    @Override
    public void onSend(BaseDataPacket packet, int dataLength) {
        //packet.getType() 过滤数据
        Log.i(TAG, "发送:" + packet);
    }
}
